#ifndef __USART_H
#define __USART_H
#include "stdio.h"	
#include "sys.h" 

#define SYSTEM_SUPPORT_USART1    1
#define SYSTEM_SUPPORT_USART2    1
#define SYSTEM_SUPPORT_USART3    1
#define SYSTEM_SUPPORT_UART4     1
#define SYSTEM_SUPPORT_UART5     1


#if SYSTEM_SUPPORT_USART1
#define DMA_USART1_data_len 1024
extern u8 DMA_USART1_data[DMA_USART1_data_len];
void USART1_Config(u32 bound);
void USART1_send_byte(u8 data);
void USART1_send_buf(u8 *buf,u16 len);
#endif

#if SYSTEM_SUPPORT_USART2
#define DMA_USART2_data_len 128
extern u8 DMA_USART2_data[DMA_USART2_data_len];
void USART2_Config(u32 bound);
void USART2_send_byte(u8 data);
void USART2_send_buf(u8 *buf,u16 len);
#endif

#if SYSTEM_SUPPORT_USART3
#define DMA_USART3_data_len 128
extern u8 DMA_USART3_data[DMA_USART3_data_len];
void USART3_Config(u32 bound);
void USART3_send_byte(u8 data);
void USART3_send_buf(u8 *buf,u16 len);
#endif

#if SYSTEM_SUPPORT_UART4
#define DMA_UART4_data_len 128
extern u8 DMA_UART4_data[DMA_UART4_data_len];
void UART4_Config(u32 bound);
void UART4_send_byte(u8 data);
void UART4_send_buf(u8 *buf,u16 len);
#endif

#if SYSTEM_SUPPORT_UART5
void UART5_Config(u32 bound);
void UART5_send_byte(u8 data);
void UART5_send_buf(u8 *buf,u16 len);
#endif

#endif


